Expressions Basics

CT (Current Time)

The most important column in the Expressions file is the one called CT, or Current Time. When Portfolio evaluates an Expression, it looks at each time period to decide how to perform the calculation designated in this column. Unless there is overriding information in the other columns, the information necessary to evaluate the Expression is contained in the equation in the CT column. We always look to the CT column first when evaluating an Expression.

For example, the formula for daily production is annual production divided by 365. In the CT column, we would reference the cell containing production and divide by 365, using normal Excel syntax. Thus, if production is in row 10 and CT is in column M, the equation in CT would be “=M10/365.” Upon import, Portfolio will read this relationship into its calculation engine.

Click image to expand or minimize. 

The first level of modification to the expressions in the CT column will be contained in the FYF (First Year Formula) and PT (Prior Time) columns.

FYF (First Year Formula)

Sometimes the formula in the CT column is all we need to evaluate that Metric Expression for every year but the first. The first year may contain a previous balance or other starting value that can only be evaluated outside of the program or in another Expression. In these cases, we can seed the calculation (provide the value for the first year) by placing a value or formula in the FYF column in the same row as the rest of the Expression. We evaluate subsequent time periods according to the formula in the CT column. A simple example might be placing the existing reserve balance in the FYF column when calculating reserves.

The FYF and CT columns must contain Excel formulae or values or be left blank. They cannot contain text. No Expression can have a reference to the FYF, the can only reference CT, PT or built in functions.

PT (Prior Time)

In many formulae, it is useful to include a reference to a prior time period. For example, reserves often require a calculation of the previous reserve balance, plus any reserve additions, minus production. In this case, we reference the PT column in our equation to indicate a reference to the prior time period. Thus, the reserve calculation would look something like “=N25+M11-M10”, where the computation is contained in row 25, (N25 refers to the result of the calculation in the previous time period, M11 references reserve adds, and M10 references annual production.

It is important to note that this syntax works even though the PT cell is empty. The value within the PT column is not read into Portfolio, just the relationship. However, we can put “dummy data” into the PT column if we wish, in order to test our expression.

We often use FYF and PT together. Let’s say that we have a starting reserve balance that we put into the FYF column (5,000,000 in the example below). The equation in the CT column is as above: prior reserves + current reserve adds - current production. Starting in the second time period, the Expressions file uses the equation in the CT column. In year 2, a reference to the PT column would be a reference to the value in year one. In the third time period, a reference to the PT column is a reference to the value in year 2, and so on.

Click image to expand or minimize.